import request from '@/utils/request'
// 获取学生列表
export const getStudentListApi = (params) => {
    return request({
        url: 'admin/class/student',
        method: 'GET',
        params,

    })

}
//根据学科id获取对应班级列表
export const getClassListApi = (params) => {
    return request({
        url: 'admin/class/class',
        params,
    })

}
//添加学员信息
export const addStudentApi = (data) => {
    return request({
        url: 'admin/class/student',
        method: 'POST',
        data,
    })
}
// 根据id获取学生详情
export const getStudentInfoApi = (id) => {
    return request({
        url: 'admin/class/student/' + id,
        method: "GET",


    })
}
// 修改学生信息
export const editStudentApi = (data) => {
    return request({
        url: 'admin/class/student/' + data.id,
        method: "PUT",
        data,
    })

}
// 删除学生信息
export const delStudentApi = (data) => {
    return request({
        url: 'admin/class/student',
        method: 'DELETE',
        data,
    })
}
// 批量禁用启用
export const ChangeStudentsState = (data) => {
    return request({
    url:'admin/class/studentChangeStatus',
        method: "PUT",
    data,//{id:[],status:3/2}
    })
}
// 批量上传学员信息
export const uploadExcelApi = (data) => {
    return request({
    url:'/admin/class/student/import',
        method: 'POST',
    data,
    })

}
